<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src='https://unpkg.com/@antv/l7'></script>
    <script src="https://lib.baomitu.com/jquery/2.2.4/jquery.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0
        }

        #map {
            width: 100vw;
            height: 100vh;
        }

        html,
        body {
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div id="map">

    </div>
    <script>
        var { Scene, GaodeMap } = L7;
        const scene = new Scene({
            id: 'map',
            map: new GaodeMap({
                /* dark|light|normal */
                style: 'normal', // 样式URL
                center: [120.19382669582967, 30.258134],
                pitch: 50,
                zoom: 2,
                // token: '3851594382e218c49865a4d6a5170b52',
            }),
            logoVisible: false
        });
        /*
        1、侧重地理数据的展示
        2、map是作为场景Scene的一个属性
        Scene场景  使用地图来实现地理数据的可视化
         */
        /* L7
        阿里
        高德 --阿里  国内
        国际 mapbox
         */
        // 控件
        const { Logo, Zoom } = L7;
        scene.on('loaded', () => {
            const logo = new Logo({
                // 图片 url
                img: 'https://img.gejiba.com/images/dfdb6db1623eb881e724f58d9a366af8.png',
                // 跳转地址
                href: 'http://www.x-zd.com/m',
            });
            scene.addControl(logo);
            const zoom = new Zoom({
                zoomInTitle: '放大',
                zoomOutTitle: '缩小',
            });
            scene.addControl(zoom);

            const scale = new L7.Scale({
                zoomInTitle: '放大',
                zoomOutTitle: '缩小',
            });
            scene.addControl(scale);
            const mouseLocation = new L7.MouseLocation({
                transform: (position) => {
                    return position;
                },
            });
            scene.addControl(mouseLocation);
            const mapTheme = new L7.MapTheme({});
            scene.addControl(mapTheme);
        });
    </script>
</body>

</html>